package com.itboye.sunsun.adapter;


import java.util.ArrayList;

import com.itboye.sunsun.R;

import android.content.Context;
import android.graphics.Bitmap;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;


public class ForumHoneGrideViewPet extends BaseAdapter{


	ArrayList<Bitmap> arrayList;
	Context context;
	public ForumHoneGrideViewPet(ArrayList<Bitmap> arrayList,Context context){
		this.arrayList=arrayList;
		this.context=context;
	}
	@Override
	public int getCount() {
		// TODO Auto-generated method stub
		return 3;
	}

	@Override
	public Object getItem(int position) {
		// TODO Auto-generated method stub
		return arrayList==null?0:arrayList.get(position);
	}

	@Override
	public long getItemId(int position) {
		// TODO Auto-generated method stub
		return position;
	}

	@Override
	public View getView(int position, View convertView, ViewGroup parent) {
		MyHolder holder;
		if(convertView==null){
			holder=new MyHolder();
			convertView=LayoutInflater.from(context).inflate(R.layout.forum_hone_gridview_item, null);
			convertView.setTag(holder);
		}else{
			holder=(MyHolder) convertView.getTag();
		}
		return convertView;
	}

	
	public class MyHolder{
		ImageView img_goods;
	}

}
